<template>
  <div class="commit-wrap">
    <el-card class="box-card">
      <div slot="header" class="clearfix">
        <h2>
          <i class="el-icon-s-order"></i>
          评论列表
        </h2>
      </div>
      <div v-for="m in commit" :key="m.id" style="margin-top: 10px;">
        <div>
          <div style="text-align: center;font-size: small;color: #77787b;">
            {{ m.commontTime }}
          </div>

          <el-tag type="success">{{ m.email }} </el-tag>
        </div>

        <div class="commitContent">
          {{ m.commont }}
        </div>
      </div>
    </el-card>
  </div>
</template>

<script>
export default {
  name: "Commit",
  data() {
    return {
      commit: {},
    };
  },
  mounted() {
    this.initCommit();
  },
  methods: {
    initCommit() {
      const blogId = this.$route.params.blogId;
      this.$axios
        .post("/commont/commont/" + blogId)
        .then((res) => {
          //   console.log(res.data.data);
          this.commit = res.data.data;
        })
        .catch((err) => {
          console.error(err);
        });
    },
  },
};
</script>

<style>
.commit-wrap {
  margin-bottom: 100px;
}
.commitContent {
  width: 100%;
  height: 50px;

  background-color: #d3d7d4;
}
</style>
